﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ForumMaster.Master" AutoEventWireup="true"
    CodeBehind="AddForum.aspx.cs" Inherits="FilStartUps.Admin.AddForum" %>

    <%@ Register Src="../Controls/FilStartUps_PageNav.ascx" TagName="FilStartUps_PageNav"
    TagPrefix="uc1" %>
<asp:Content ID="Nav" ContentPlaceHolderID="MainNav" runat="server">
    <uc1:FilStartUps_PageNav ID="FilStartUps_PageNav1" runat="server" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            height: 30px;
        }
    </style>
</asp:Content>
<asp:Content ID="Main" ContentPlaceHolderID="ContentForumDisplay" runat="server">
    <asp:ScriptManager ID="sm" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel runat="server">
        <ContentTemplate>
            <asp:DataGrid OnUpdateCommand="dgforumlist_Update" OnCancelCommand="dgforumlist_Cancel"
                OnEditCommand="dgforumlist_EditCommand" PageSize="5" CellPadding="11" BorderColor="Silver"
                AllowPaging="true" AutoGenerateColumns="false" runat="server" OnPageIndexChanged="dgforumlist_Paging"
                ID="dgforumlist">
                <AlternatingItemStyle BackColor="Lavender" />
                <PagerStyle Mode="NumericPages" HorizontalAlign="Left" />
                <Columns>
                    <asp:TemplateColumn HeaderText="ForumID">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lbforumid_" Text='<%# DataBinder.Eval(Container.DataItem, "forumidPK") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="Forum Title">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lbforumid" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "forumidPK") %>'></asp:Label>
                            <asp:Label runat="server" ID="lbforumtitle" Text='<%# DataBinder.Eval(Container.DataItem, "forumtitle") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox runat="server" ID="txtforumtitle" Text='<%# DataBinder.Eval(Container.DataItem, "forumtitle") %>'></asp:TextBox>
                        </EditItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="Forum Description">
                        <ItemTemplate>
                            <asp:Literal runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "forumdescription") %>'></asp:Literal>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "forumdescription") %>'
                                TextMode="MultiLine" ID="txtdescription" Width="300px" Height="150px">
                            </asp:TextBox>
                        </EditItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="Datecreated">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lbdatecreated" Text='<%# DataBinder.Eval(Container.DataItem, "datecreated") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="Forum Status">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lbstatus" Text='<%# DataBinder.Eval(Container.DataItem, "disabled") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:CheckBox runat="server" ID="cbenabled" Checked='<%#DataBinder.Eval(Container.DataItem, "disabled") %>' />
                        </EditItemTemplate>
                    </asp:TemplateColumn>
                    <asp:EditCommandColumn CancelText="Cancel" EditText="Edit" UpdateText="Update" HeaderText="Option" />
                </Columns>
            </asp:DataGrid>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnadd" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
    <h1>
        Forum Topic</h1>
    <table width="100%">
        <tr>
            <td class="style1">
                Forum Title (50 chars max):
                <asp:TextBox runat="server" Width="420px" ID="txtforumtitle"></asp:TextBox>
                <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtforumtitle"
                    Display="Dynamic" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>--%>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                Select Forum Group:<asp:DropDownList runat="server" AppendDataBoundItems="true" ID="dpforumgroup">
                    <asp:ListItem Value="-1">Select one Option</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:TextBox runat="server" TextMode="MultiLine" Height="60px" Width="600px" ID="txtforumdescription"
                    MaxLength="255">
                </asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button runat="server" Text="Add Forum Topic" ID="btnadd" OnClick="btnadd_Click"
                    CausesValidation="false" />
                <asp:Button runat="server" Text="Cancel" ID="btncancel" CausesValidation="false" />
            </td>
        </tr>
    </table>
</asp:Content>
